$(function() {
	$('#submitForm').validate({
		debug: true, //调试模式取消submit的默认提交功能   
        focusInvalid: false, 
        onkeyup: false,   
        submitHandler: function(form){  
            if (typeof jQuery.data(this, "disabledOnSubmit") == 'undefined') {
            	jQuery.data(this, "disabledOnSubmit", {submited : true});
            	form.submit();
            } else {
            	// repeat submit ignore;
            }
        },   
		errorPlacement : function(error, element) {
			element.siblings("span[class='red']").text(error.text());
		},
        success:function(element){
            element.siblings("span[class='error red']").text("");
        },
		rules : {
			content : {
				required : true,
                minlength:1
			}
		},
		messages : {
			content : {
				required : "请输入敏感词"
			}
		}
	});
});


function deleteCommentSensitivewords(id){
	var r=confirm("确认删除？");
	if (r==true){
		window.location.href=appServer + "/comment/sensitivewords/delete.htm?id="+id;
	}else{
		return;
	}
}

function goAddPage(){
	window.location.href = appServer + "/comment/sensitivewords/add.htm";
}
